|
|
|
|
|
|
|
MsgBox CStr(Err.Number) & " - " + Err.Description
Resume Next
End If
'
LocalExit:
'
End Sub |
|
|
|
|
|
|
|
|
Save the form as FRMERRTYPES.FRM and the project as PRJERRTYPES.VBP. Now run this project. When you click on the Control button, the program tries to open the CONTROL.TXT file. If it can't be found, you see the error message (see Figure 14.8). |
|
|
|
|
|
|
|
|
Figure 14.8.
Displaying the File not Found error. |
|
|
|
|
|
|
|
|
If the user selects OK, the program calls the CommonDialog control and prompts the user to locate the CONTROL.TXT file. It can be found in the \TYSDBVB5\SOURCE\CHAP14 directory (see Figure 14.9). |
|
|
|
|
|
|
|
|
Figure 14.9.
Attempting to locate the CONTROL.TXT file. |
|
|
|
|
|